import { createRouter, createWebHistory } from 'vue-router'
import index from '../views/index.vue'
import intelligentMatch from '../views/intelligentMatch.vue'
import financingList from '../views/financingList.vue'
import Login from '../views/Login.vue'
import financeDetail from '../views/financeDetail.vue'
const routes = [
  {
      path: '/',
      name: 'index',
      component: index,
      redirect:'login',
      children:[
        {
          path: '/intelligentMatch',
          name: 'intelligentMatch',
          component: intelligentMatch
        },
        {
          path: '/financingList',
          name: 'financingList',
          component: financingList
        },
        {
          path: '/financeDetail',
          name: 'financeDetail',
          component: financeDetail
        },
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: Login,
    }
]
const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 